package com.example.multithreading;

public class ch03_03 {
    public static void main(String[] args) {
        Thread t1 =new Thread(()->{
            while (true){
                System.out.println("t1");
            }
        });
        t1.setPriority(2); //线程的优先级


        Thread t2 =new Thread(()->{
            while(true){
                System.out.println("t2");
            }
        });
        t1.setPriority(10);

        t1.start();
        t2.start();
    }
}
